<?php
class Database_Library {
	
	public $host = "localhost";
	public $user = "root";
	public $password = "";
	public $database = "adrian_base";
	
	public function __construct() {
		$link = @mysql_connect($this->host, $this->user, $this->password);
		if(!$link){
			die(@mysql_error());
		}
		$db = @mysql_select_db($this->database);
		if(!$db){
			die(@mysql_error);
		}
	}
	
	public function mysql_escape($variable){
		$variable = @mysql_real_escape_string($variable);
		return $variable;
	}
	
	public function fetch_array($result){
		$data = @mysql_fetch_array($result);
		return $data;
	}
	
	public function mysql_run($sql){
		$result = @mysql_query($sql) or die(mysql_error());
		return $result;
	}
	
	public function __destruct(){
		
	}
	
	
}